﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooFrameworkNetworkHelpersGTAReceivedInfoHelperWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 11, 2, 1);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "GetReceivedIndex", _m_GetReceivedIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMsgIndex", _m_GetMsgIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UpdateReceivedIndex", _m_UpdateReceivedIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "AddReceivedMsgIndexToBuffer", _m_AddReceivedMsgIndexToBuffer_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetReceivedMsgIndexFromBuffer", _m_GetReceivedMsgIndexFromBuffer_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PrintReceivedIndex", _m_PrintReceivedIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "ResetIndex", _m_ResetIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "ResetPacketSerializerMsgIndex", _m_ResetPacketSerializerMsgIndex_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "CheckMsgAvaliable", _m_CheckMsgAvaliable_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "SetIsReconnecting", _m_SetIsReconnecting_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "IsReconnecting", _g_get_IsReconnecting);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "RecvMsgIdx", _g_get_RecvMsgIdx);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "RecvMsgIdx", _s_set_RecvMsgIdx);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetReceivedIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                        var gen_ret = Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.GetReceivedIndex(  );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetMsgIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                        var gen_ret = Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.GetMsgIndex(  );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UpdateReceivedIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _msgIdx = LuaAPI.xlua_tointeger(L, 1);
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.UpdateReceivedIndex( _msgIdx );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddReceivedMsgIndexToBuffer_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _sn = LuaAPI.xlua_tointeger(L, 1);
                    int _messageId = LuaAPI.xlua_tointeger(L, 2);
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.AddReceivedMsgIndexToBuffer( _sn, _messageId );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetReceivedMsgIndexFromBuffer_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _messageId = LuaAPI.xlua_tointeger(L, 1);
                    
                        var gen_ret = Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.GetReceivedMsgIndexFromBuffer( _messageId );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PrintReceivedIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    int _msgIdx = LuaAPI.xlua_tointeger(L, 1);
                    int _msgId = LuaAPI.xlua_tointeger(L, 2);
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.PrintReceivedIndex( _msgIdx, _msgId );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    int _msgIdx = LuaAPI.xlua_tointeger(L, 1);
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.PrintReceivedIndex( _msgIdx );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.PrintReceivedIndex!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ResetIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.ResetIndex(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_ResetPacketSerializerMsgIndex_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.ResetPacketSerializerMsgIndex(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_CheckMsgAvaliable_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _msgIdx = LuaAPI.xlua_tointeger(L, 1);
                    
                        var gen_ret = Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.CheckMsgAvaliable( _msgIdx );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetIsReconnecting_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    bool _isReconnecting = LuaAPI.lua_toboolean(L, 1);
                    
                    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.SetIsReconnecting( _isReconnecting );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IsReconnecting(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushboolean(L, Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.IsReconnecting);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_RecvMsgIdx(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.xlua_pushinteger(L, Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.RecvMsgIdx);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_RecvMsgIdx(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Framework.Network.Helpers.GTAReceivedInfoHelper.RecvMsgIdx = LuaAPI.xlua_tointeger(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
